import {getSignLog, postSignLog, putSignLog} from '@/base/api/SignLogApi';
import {SignLog} from '@/base/model/SignLog';

export class FormBloc {
  form = new SignLog();

  load(id: number) {
    return getSignLog(id)
      .then((res) => {
        this.form = res.data;
      });
  }

  save(id: number | '') {
    const entity: any = {
      memberId: this.form.memberid
    };
    return id ? putSignLog(id, entity) : postSignLog(entity);
  }
}
